#ifndef __OC_SqliteFileManager_H__
#define __OC_SqliteFileManager_H__

#include "ServerDef.h"
#include "OCMain/Singleton.h"
#include "OCMain/StringUtil.h"
#include "json/json.h"
#include "sqlpp11/sqlite3/connection.h"

namespace OCPP
{
	class _ServerExport SqliteFileManager
	{
	public:
		void create(String fileName);
		void packDir(String folder);
		std::tuple<std::set<String>, std::set<String>> getExist();
		bool existInfo(String path);
		bool existData(String md5);
		void setCommitEveryNum(uint32 value) { _commitEveryNum = value; }
		void setRemoveAfterInser(bool value) { _removeAfterInser = value; }
	private:
		std::shared_ptr<sqlpp::sqlite3::connection> connection;
		bool _removeAfterInser = false;
		uint32 _commitEveryNum = 10000;
	};
}

#endif